package com.open.capacity.oss.config;

import com.huawei.saas.config.binding.SchemaBindingStrategy;
import com.huawei.saas.properties.TenantProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

/**
 * schema适配器扩展
 * @program: open-capacity-platform
 * @author: GuoGaoJu
 * @create: 2023-03-29
 **/
@Configuration
public class CustomerSchemaAdapter implements SchemaBindingStrategy {

    @Autowired
    private TenantProperties tenantProperties;

    @Override
    public String getSchema(String key) {
        return tenantProperties.getSchema();
    }
}
